﻿using System;
using System.Xml.Serialization;

namespace openSourceC.DaylifeClient
{
	/// <summary>
	///		The type of value to search by.
	/// </summary>
	public enum ArticleSearchByEnum
	{
		/// <summary></summary>
		[XmlEnum("article_id")]
		ArticleId,

		/// <summary></summary>
		[XmlEnum("url")]
		Url
	}

	/// <summary>
	///		DayPI batch response codes.
	/// </summary>
	public enum BatchResponseCodeEnum : int
	{
		/// <summary>Success. All individual requests were completed without a timeout. However, this does not guarantee that each individual request was successful.</summary>
		BatchSuccess = 3001,


		/// <summary>One or more individual requests did not complete within the 25 second timeframe.</summary>
		InvalidApiCredentials = -3001,

		/// <summary>Duplicate request_ids provided in the individual requests.</summary>
		InvalidInputId = -3002,

		/// <summary>One or more of the individual DayPI request were not formatted properly.</summary>
		InvalidStartTimeFormatDate = -3003,

		/// <summary>More than 12 requests provided as input to the batch API.</summary>
		InvalidDateRange = -3004
	}

	/// <summary>
	///		DayPI response codes.
	/// </summary>
	public enum ResponseCodeEnum : int
	{
		/// <summary>Success.</summary>
		Success = 2001,

		/// <summary>Success (cached response).</summary>
		SuccessCachedResponse = 2002,


		/// <summary>Invalid API Credentials</summary>
		InvalidApiCredentials = -2001,

		/// <summary>Invalid input id</summary>
		InvalidInputId = -2002,

		/// <summary>Date start_time is in an invalid format. Please use "YYYY-MM-DD hh:mm:ss" or an epoch value.</summary>
		InvalidStartTimeFormatDate = -2003,

		/// <summary>Invalid date range [%(start)s, %(end)s]. Start date cannot be earlier than the end date.</summary>
		InvalidDateRange = -2004,

		/// <summary>Source filter ID is invalid.</summary>
		InvalidSourceFilterId = -2006,

		/// <summary>Invalid topic id provided in the "speaker_topic_id" parameter.</summary>
		InvalidSpeakerTopicId = -2007,

		/// <summary>Topic Not found in system.</summary>
		TopicNotFound = -2008,

		/// <summary>Invalid value "%(error_value)s" for field "%(error_field)s.</summary>
		InvalidFieldValues = -2009,

		/// <summary>Found multiple values for parameter "%(error_field)s". Only one instance of this parameter is permitted.</summary>
		FoundMultipleValuesForSingleInstanceParameter = -2011,

		/// <summary>Multiple name-value pairs found for a parameter that is allowed only once.</summary>
		FoundMultipleNameValuePairsForSingleInstanceParameter = -2012,

		/// <summary>Required ID or name not found in the request.</summary>
		MissingIdOrName1 = -2013,

		/// <summary>Invalid Topic Type.</summary>
		InvalidTopicType = -2014,

		/// <summary>Invalid Source ID.</summary>
		InvalidSourceId = -2016,

		/// <summary>Conflicting usage of parameters..</summary>
		ConflictingUsageOfParameters = -2017,

		/// <summary>Invalid Source Type.</summary>
		InvalidSourceType = -2018,

		/// <summary>Invalid Source Rank.</summary>
		InvalidSourceRank = -2019,

		/// <summary>Invalid Query.</summary>
		InvalidQuery = -2020,

		/// <summary>Query exceeded the maximum term limit of 32 terms and/or phrases.</summary>
		QueryExceedsMaximumTermLimit = -2021,

		/// <summary>Content exceeded the maximum character limit of 20,000 characters.</summary>
		ContentExceedsMaximumCharacterLimit = -2022,

		/// <summary>Invalid text in the content parameter.</summary>
		InvalidContentParameterText = -2023,

		/// <summary>Request time out.</summary>
		RequestTimeout1 = -2025,

		/// <summary>Request time out.</summary>
		RequestTimeout2 = -2026,

		/// <summary>Invalid value for min_topic_image_confidence. Valid values are high, low or medium.</summary>
		InvalidMinTopicImageConfidenceValue = -2027,

		/// <summary>Request time out.</summary>
		RequestTimeout3 = -2028,

		/// <summary>Start time and end time must be within the last 90 days.</summary>
		StartTimeOrEndTimeExceedsLimits = -2029,

		/// <summary>Value of top_count cannot exceed 50.</summary>
		TopCountValueExceedsLimit = -2030,

		/// <summary>Required ID or name not found in the request.</summary>
		MissingIdOrName2 = -2031
	}

	/// <summary>
	///		Search sort by enumerator.
	/// </summary>
	public enum SearchSortByEnum
	{
		/// <summary>Sort by a combination of date and relevance.</summary>
		[XmlEnum("daterank")]
		DateRank,

		/// <summary>Sort by date.</summary>
		[XmlEnum("date")]
		Date,

		/// <summary>Sort by relevance.</summary>
		[XmlEnum("relevance")]
		Relevance
	}

	/// <summary>
	///		Sort by enumerator.
	/// </summary>
	public enum SortByEnum
	{
		/// <summary>Sort by date.</summary>
		[XmlEnum("date")]
		Date,

		/// <summary>Sort by relevance.</summary>
		[XmlEnum("relevance")]
		Relevance
	}

	/// <summary>
	///		The type of value to search by.
	/// </summary>
	public enum SourceSearchByEnum
	{
		/// <summary></summary>
		[XmlEnum("source_id")]
		SourceId,

		/// <summary></summary>
		[XmlEnum("name")]
		Name
	}

	/// <summary>
	///		The type of value to search by.
	/// </summary>
	public enum TopicSearchByEnum
	{
		/// <summary></summary>
		[XmlEnum("topic_id")]
		TopicId,

		/// <summary></summary>
		[XmlEnum("name")]
		Name
	}

	/// <summary>
	///		Topic image confidence enumerator.
	/// </summary>
	public enum TopicImageConfidenceEnum
	{
		/// <summary>Low confidence.</summary>
		[XmlEnum("low")]
		Low,

		/// <summary>Medium confidence.</summary>
		[XmlEnum("medium")]
		Medium,

		/// <summary>High confidence.</summary>
		[XmlEnum("high")]
		High
	}

	/// <summary>
	///		Topic video confidence enumerator.
	/// </summary>
	public enum TopicVideoConfidenceEnum
	{
		/// <summary>Low confidence.</summary>
		[XmlEnum("low")]
		Low,

		/// <summary>Medium confidence.</summary>
		[XmlEnum("medium")]
		Medium,

		/// <summary>High confidence.</summary>
		[XmlEnum("high")]
		High
	}
}
